package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 【请填写功能名称】对象 book
 *
 * @author ruoyi
 * @date 2022-12-08
 */
public class Book extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 图书id 主键自增 */
    private Long id;

    /** 书籍名称 */
    @Excel(name = "书籍名称")
    private String bookName;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 出版社 */
    @Excel(name = "出版社")
    private String publish;

    /** ISBN码 */
    @Excel(name = "ISBN码")
    private String isbn;

    /** 书籍简介 */
    @Excel(name = "书籍简介")
    private String introduction;

    /** 封面 */
    @Excel(name = "封面")
    private String coverImage;

    /** 书籍图片 */
    @Excel(name = "书籍图片")
    private String bookImages;

    /** 访问数量 */
    @Excel(name = "访问数量")
    private Long viewNumber;

    /** 出版时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出版时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date pubDate;

    /** 书籍类别ID */
    @Excel(name = "书籍类别ID")
    private Long categoryId;

    private List<Long> categoryIdList;

    /** 库存 */
    @Excel(name = "库存")
    private Long count;

    /** 价格 */
    @Excel(name = "价格")
    private BigDecimal price;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setBookName(String bookName)
    {
        this.bookName = bookName;
    }

    public String getBookName()
    {
        return bookName;
    }
    public void setAuthor(String author)
    {
        this.author = author;
    }

    public String getAuthor()
    {
        return author;
    }
    public void setPublish(String publish)
    {
        this.publish = publish;
    }

    public String getPublish()
    {
        return publish;
    }
    public void setIsbn(String isbn)
    {
        this.isbn = isbn;
    }

    public String getIsbn()
    {
        return isbn;
    }
    public void setIntroduction(String introduction)
    {
        this.introduction = introduction;
    }

    public String getIntroduction()
    {
        return introduction;
    }
    public void setCoverImage(String coverImage)
    {
        this.coverImage = coverImage;
    }

    public String getCoverImage()
    {
        return coverImage;
    }
    public void setBookImages(String bookImages)
    {
        this.bookImages = bookImages;
    }

    public String getBookImages()
    {
        return bookImages;
    }
    public void setViewNumber(Long viewNumber)
    {
        this.viewNumber = viewNumber;
    }

    public Long getViewNumber()
    {
        return viewNumber;
    }
    public void setPubDate(Date pubDate)
    {
        this.pubDate = pubDate;
    }

    public Date getPubDate()
    {
        return pubDate;
    }
    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }
    public void setCount(Long count)
    {
        this.count = count;
    }

    public Long getCount()
    {
        return count;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }

    public List<Long> getCategoryIdList() {
        return categoryIdList;
    }

    public void setCategoryIdList(List<Long> categoryIdList) {
        this.categoryIdList = categoryIdList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("bookName", getBookName())
            .append("author", getAuthor())
            .append("publish", getPublish())
            .append("isbn", getIsbn())
            .append("introduction", getIntroduction())
            .append("coverImage", getCoverImage())
            .append("bookImages", getBookImages())
            .append("viewNumber", getViewNumber())
            .append("pubDate", getPubDate())
            .append("categoryId", getCategoryId())
            .append("count", getCount())
            .append("price", getPrice())
            .toString();
    }
}
